//
//  CAIShareKit.h
//  CollagePicture
//
//  Created by simon on 2021/12/2.
//


#import <Foundation/Foundation.h>
#import "ShareMessageModel.h"


typedef NS_ENUM(NSInteger,CAISocialPlatformType)
{
    CAISocialPlatformType_WechatSession      = 1, //微信聊天
    CAISocialPlatformType_WechatTimeLine     = 2, //微信朋友圈
    CAISocialPlatformType_DingDing           = 27,//钉钉
    
};


///导入
///#import <UMCommon/UMCommon.h>
///#import <UShareUI/UShareUI.h>
///#import <UMShare/UMShare.h>
@interface ShareManager : NSObject

+ (instancetype)sharedInstance;

///初始化
- (void)initWithAppKey:(NSString *)appKey;

///test用
-(void)configUShareDefaultPlatforms;

/// 设置通用链接，微信需要设置
- (void)setUniversalLinkDic:(NSDictionary *)dic;

/// 设置平台的appkey
/// @param platformType 平台类型 @see CAISocialPlatformType
/// @param appKey 第三方平台的appKey
/// @param appSecret 第三方平台的appSecret
- (BOOL)setPlaform:(CAISocialPlatformType)platformType
            appKey:(NSString *)appKey
         appSecret:(NSString *)appSecret;


///获得从sso或者web端回调到本app的回调
- (BOOL)handleOpenURL:(NSURL *)url;


///UniversalLink回调到本app的回调
- (BOOL)handleUniversalLink:(id)userActivity options:(NSDictionary *)options;


///设置预定于平台，即设置UI弹窗要显示的平台:UMSocialPlatformType。开发者需要自己预定义自己需要的平台。传入的平台必须是合法并且是core模块已经检测到的已经存在的平台。不然会被过滤掉(此条款是上线appStore审核的条件，开发者必须注意)
+ (void)setPreDefinePlatforms:(NSArray *)preDefinePlatforms;


///弹出弹窗
+ (void)showShareMenuViewInWindowWithData:(ShareMessageModel *)model;


@end



